package com.hxzy.yygh.hosp.controller;

import com.hxzy.yygh.common.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

@Api(tags = "用户登录模块")
@RestController
@RequestMapping("/admin/hosp/index")
public class IndexController {

    //登录接口
    @ApiOperation(value = "登录接口")
    @PostMapping("login")
    public Result login(){
        Map<String, Object> map = new HashMap<>();
        map.put("token","admin-token");
        return Result.ok(map);
    }

   //用户信息展示接口
    @ApiOperation(value = "用户信息展示接口")
    @GetMapping("info")
    public Result info(){
        Map<String, Object> map = new HashMap<>();
        map.put( "roles","[admin]");
        map.put("introduction","I am a super administrator");
        map.put("avatar","https://yygh-hxzy-bucket.oss-cn-chengdu.aliyuncs.com/2023/07/08/32dd4e173172420b8e69c26500e4e470fsxnkv.jpg");
        map.put("name","Super Admin111");
        return Result.ok(map);
    }
}
